package JAVA300.第七章数组;

public class TestAnonymousClass {

    public  static void test1(A a){
        a.aa();
    }

    public static void main(String[] args) {
        test1(new A() {//取代了继承接口类
            @Override
            public void aa() {
                System.out.println("test aa");

            }
        });
    }
}

interface A{
    void aa();
}
